Monotonic counter objects
Monotonic counter objects represent hardware counters that exist on the device. Also:
-
The value of the counter is guaranteed to increase by 1 each time it is read.
-
The monotonic counter is supported only on soft (non-smart card based) tokens and the value of the counter on each different token is the same.
-
There is only one monotonic counter per token.
-
The monotonic counter is automatically created whenever a token is initialized and exists by default on the Admin Token.
-
The value is interpreted as a 160-bit big-endian binary integer (MSB on left).
-
The Token SO can change the count value by setting the
CKA_VALUE
attribute.
Monotonic Counter Attributes
Attribute | Data type | Meaning |
---|---|---|
CKA_RESET_ON_INIT1 |
CK_BBOOL |
The value of the counter will reset to a previously returned value if the token is initialized using C_InitializeToken. |
CKA_HAS_RESET1 |
CK_BBOOL |
The value of the counter has been reset at least once at some point in time. |
CKA_VALUE 1 |
Byte Array | The current version of the monotonic counter. The value is returned in big endian order. This value must be 20 bytes in size. Any attempt to set a value less than 20 bytes will fail. |
1 Read Only. The CKA_VALUE
attribute cannot be set by the client.